From f0190474025ae9fce5ed3bd5b7ffe02529f711ef Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 13 Aug 2009 13:04:28 +0200 Subject: [PATCH] Don't un-invalidate area that will be immediately invalidated again. When moving an area we move any invalid region in this area to the new place, but there really is no need to remove the old invalid area as it would just be invalidated again (being newly exposed). --- gdk/gdkwindow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index bf56a089a5..cfb9d9edc9 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3008,7 +3008,10 @@ move_region_on_impl (GdkWindowObject *private, /* Convert from target to source */ gdk_region_offset (update_area, -dx, -dy); gdk_region_intersect (update_area, impl_window->update_area); - gdk_region_subtract (impl_window->update_area, update_area); + /* We only copy the area, so keep the old update area invalid. + It would be safe to remove it too, as code that uses + move_region_on_impl generally also invalidate the source + area. However, it would just use waste cycles. */ /* Convert back */ gdk_region_offset (update_area, dx, dy); -- 2.30.2